﻿@model IEnumerable<MyWebApp.Models.NotificationModel>

<li class="dropdown notifications-menu">
    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
        <i class="fa fa-bell-o"></i>
        <span class="label label-warning">@Model.Count()</span>
    </a>
    <ul class="dropdown-menu">
        <li class="header">你有 @Model.Count()消息</li>
        <li>
            <!-- inner menu: contains the actual data -->
            <ul class="menu">
                @{
                    foreach (var item in Model)
                    {
                        string typeclass = "fa-user text-aqua";
                        if (item.Type == "users")
                        {
                            typeclass = "fa-users text-red";
                        }
                        else if (item.Type == "warning")
                        {
                            typeclass = "fa-warning text-yellow";
                        }
                        <li>
                            <a href="#">
                                <i class="fa @typeclass"></i>@item.Content
                            </a>
                        </li>
                    }
                }
            </ul>
        </li>
        <li class="footer"><a href="#">查看全部</a></li>
    </ul>
</li>
